import time
i = 3
print('默认用户名为：zhangsan，密码为：zs123')
while i > 0:
    username = input('请输入用户名：')
    password = input('请输入密码：')
    if 'zhangsan' == username and password == 'zs123':
        print('登录成功')
        time.sleep(3)
        break
    else:
        i -= 1
        if i == 0:
            print('输入错误次数过多，请稍后再试')
            break
        else:
            print(f'您还有{i}次机会')